<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Список товаров &ndash; Магазинчик</title>
</head>
<body>
<a data-th-href="@{/catalogue/products/create}">+ Создать товар</a>
<h1>Список товаров</h1>
<form method="get" data-th-action="@{/catalogue/products/list}">
    <label>Фильтр: <input type="text" name="filter" data-th-value="${filter}">
        <button type="submit">Поиск</button>
    </label>
</form>
<table>
    <thead>
    <tr>
        <th>#</th>
        <th>Товар</th>
    </tr>
    </thead>
    <tbody>
    <tr data-th-each="product : ${products}">
        <td data-th-text="${product.id()}"></td>
        <td>
            <a data-th-href="@{/catalogue/products/{productId}(productId=${product.id()})}"
                data-th-text="${product.title()}"></a>
        </td>
    </tr>
    </tbody>
</table>
</body>
</html>